home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 13653 < prev    next >
Mailbox/MIME Entity  |  1996-08-05  |  2.7 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: Mailbox/MIME Entity (archive/mbox).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert Newsgroup Content (archive/news) magic Supported
100% dexvert Mailbox/MIME Entity (archive/mbox) magic Supported
100% dexvert Internet Message Format (text/imf) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file news, ASCII text default
100% checkBytes Printable ASCII default
100% dexmagic PrintFox/Pagefox WEAK default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/950 MIME Email (1.0) default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime message/news default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 50 61 74 68 3a 20 68 75 | 72 73 6c 65 79 2e 69 62 |Path: hu|rsley.ib|
|00000010| 6d 2e 63 6f 6d 21 6e 65 | 77 73 0a 46 72 6f 6d 3a |m.com!ne|ws.From:|
|00000020| 20 4d 61 78 20 57 61 74 | 65 72 6d 61 6e 20 3c 64 | Max Wat|erman <d|
|00000030| 77 61 74 65 72 40 77 69 | 67 68 74 2e 68 75 72 73 |water@wi|ght.hurs|
|00000040| 6c 65 79 2e 69 62 6d 2e | 63 6f 6d 3e 0a 4e 65 77 |ley.ibm.|com>.New|
|00000050| 73 67 72 6f 75 70 73 3a | 20 63 6f 6d 70 2e 6c 61 |sgroups:| comp.la|
|00000060| 6e 67 2e 63 0a 53 75 62 | 6a 65 63 74 3a 20 52 65 |ng.c.Sub|ject: Re|
|00000070| 3a 20 50 61 72 61 6c 6c | 65 6c 20 70 72 6f 63 65 |: Parall|el proce|
|00000080| 73 73 69 6e 67 20 63 6f | 64 65 0a 44 61 74 65 3a |ssing co|de.Date:|
|00000090| 20 54 75 65 2c 20 30 39 | 20 41 70 72 20 31 39 39 | Tue, 09| Apr 199|
|000000a0| 36 20 31 36 3a 30 35 3a | 32 33 20 2b 30 31 30 30 |6 16:05:|23 +0100|
|000000b0| 0a 4f 72 67 61 6e 69 7a | 61 74 69 6f 6e 3a 20 49 |.Organiz|ation: I|
|000000c0| 42 4d 20 55 4b 20 4c 61 | 62 6f 72 61 74 6f 72 69 |BM UK La|boratori|
|000000d0| 65 73 20 4c 74 64 2e 0a | 4d 65 73 73 61 67 65 2d |es Ltd..|Message-|
|000000e0| 49 44 3a 20 3c 33 31 36 | 41 37 43 42 33 2e 32 44 |ID: <316|A7CB3.2D|
|000000f0| 38 35 40 77 69 67 68 74 | 2e 68 75 72 73 6c 65 79 |85@wight|.hursley|
|00000100| 2e 69 62 6d 2e 63 6f 6d | 3e 0a 52 65 66 65 72 65 |.ibm.com|>.Refere|
|00000110| 6e 63 65 73 3a 20 3c 34 | 6b 31 34 73 39 24 63 37 |nces: <4|k14s9$c7|
|00000120| 61 40 61 7a 75 72 65 2e | 61 63 73 75 2e 62 75 66 |a@azure.|acsu.buf|
|00000130| 66 61 6c 6f 2e 65 64 75 | 3e 0a 52 65 70 6c 79 2d |falo.edu|>.Reply-|
|00000140| 54 6f 3a 20 6d 61 78 2d | 6c 74 6f 6e 40 74 63 70 |To: max-|lton@tcp|
|00000150| 2e 75 6b 2e 63 6f 0a 4e | 4e 54 50 2d 50 6f 73 74 |.uk.co.N|NTP-Post|
|00000160| 69 6e 67 2d 48 6f 73 74 | 3a 20 77 69 67 68 74 2e |ing-Host|: wight.|
|00000170| 68 75 72 73 6c 65 79 2e | 69 62 6d 2e 63 6f 6d 0a |hursley.|ibm.com.|
|00000180| 4d 69 6d 65 2d 56 65 72 | 73 69 6f 6e 3a 20 31 2e |Mime-Ver|sion: 1.|
|00000190| 30 0a 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 3a 20 |0.Conten|t-Type: |
|000001a0| 74 65 78 74 2f 70 6c 61 | 69 6e 3b 20 63 68 61 72 |text/pla|in; char|
|000001b0| 73 65 74 3d 75 73 2d 61 | 73 63 69 69 0a 43 6f 6e |set=us-a|scii.Con|
|000001c0| 74 65 6e 74 2d 54 72 61 | 6e 73 66 65 72 2d 45 6e |tent-Tra|nsfer-En|
|000001d0| 63 6f 64 69 6e 67 3a 20 | 37 62 69 74 0a 58 2d 4d |coding: |7bit.X-M|
|000001e0| 61 69 6c 65 72 3a 20 4d | 6f 7a 69 6c 6c 61 20 32 |ailer: M|ozilla 2|
|000001f0| 2e 30 31 20 28 58 31 31 | 3b 20 49 3b 20 41 49 58 |.01 (X11|; I; AIX|
|00000200| 20 32 29 0a 0a 6c 69 70 | 63 68 65 6e 20 61 6c 65 | 2)..lip|chen ale|
|00000210| 78 20 63 68 61 6e 20 77 | 72 6f 74 65 3a 0a 3e 20 |x chan w|rote:.> |
|00000220| 0a 3e 20 48 69 2c 0a 3e | 20 0a 3e 20 49 20 68 61 |.> Hi,.>| .> I ha|
|00000230| 76 65 20 61 63 63 65 73 | 73 20 74 6f 20 61 20 53 |ve acces|s to a S|
|00000240| 70 61 72 63 53 65 72 76 | 65 72 20 32 30 30 30 20 |parcServ|er 2000 |
|00000250| 77 69 74 68 20 31 32 20 | 70 72 6f 63 65 73 73 6f |with 12 |processo|
|00000260| 72 73 2e 0a 3e 20 49 20 | 77 69 73 68 20 74 6f 20 |rs..> I |wish to |
|00000270| 63 68 61 6e 67 65 20 6d | 79 20 70 72 6f 67 72 61 |change m|y progra|
|00000280| 6d 20 73 6f 20 74 68 61 | 74 20 69 74 20 63 61 6e |m so tha|t it can|
|00000290| 20 75 73 65 20 6d 6f 72 | 65 20 74 68 61 6e 0a 3e | use mor|e than.>|
|000002a0| 20 6f 6e 65 20 70 72 6f | 63 65 73 73 6f 72 20 61 | one pro|cessor a|
|000002b0| 74 20 6f 6e 65 20 74 69 | 6d 65 20 69 6e 20 6f 72 |t one ti|me in or|
|000002c0| 64 65 72 20 74 6f 20 73 | 70 65 65 64 20 75 70 20 |der to s|peed up |
|000002d0| 74 68 65 20 65 78 65 63 | 75 74 69 6f 6e 0a 3e 20 |the exec|ution.> |
|000002e0| 74 69 6d 65 2e 20 53 75 | 70 70 6f 73 65 20 74 68 |time. Su|ppose th|
|000002f0| 65 20 6d 61 6a 6f 72 20 | 73 65 67 6d 65 6e 74 20 |e major |segment |
|00000300| 6f 66 20 65 78 65 63 75 | 74 69 6f 6e 20 74 69 6d |of execu|tion tim|
|00000310| 65 20 72 65 73 69 64 65 | 73 0a 3e 20 69 6e 20 74 |e reside|s.> in t|
|00000320| 68 65 20 63 6f 64 65 20 | 62 65 6c 6f 77 3a 0a 3e |he code |below:.>|
|00000330| 20 0a 3e 20 20 20 66 6f | 72 20 28 69 3d 30 3b 20 | .> fo|r (i=0; |
|00000340| 69 3c 31 30 3b 20 69 2b | 2b 29 7b 0a 3e 20 20 20 |i<10; i+|+){.> |
|00000350| 20 20 66 6f 72 20 28 6a | 3d 30 3b 20 6a 3c 38 3b | for (j|=0; j<8;|
|00000360| 20 6a 2b 2b 29 7b 0a 3e | 20 0a 3e 20 20 20 20 20 | j++){.>| .> |
|00000370| 20 20 61 20 6c 6f 74 20 | 6f 66 20 6f 70 65 72 61 | a lot |of opera|
|00000380| 74 69 6f 6e 73 2e 2e 2e | 2e 2e 0a 3e 20 0a 3e 20 |tions...|...> .> |
|00000390| 20 20 20 20 7d 0a 3e 20 | 20 20 7d 0a 3e 20 0a 3e | }.> | }.> .>|
|000003a0| 20 49 73 20 69 74 20 70 | 6f 73 73 69 62 6c 65 20 | Is it p|ossible |
|000003b0| 74 6f 20 6d 61 6b 65 20 | 74 68 65 20 6a 20 6c 6f |to make |the j lo|
|000003c0| 6f 70 20 67 6f 65 73 20 | 74 6f 20 38 20 70 72 6f |op goes |to 8 pro|
|000003d0| 63 65 73 73 6f 72 73 20 | 73 69 6d 75 6c 74 61 6e |cessors |simultan|
|000003e0| 65 6f 75 73 6c 79 0a 3e | 20 66 6f 72 20 65 61 63 |eously.>| for eac|
|000003f0| 68 20 69 20 76 61 6c 75 | 65 2c 20 69 6e 73 74 65 |h i valu|e, inste|
|00000400| 61 64 20 6f 66 20 73 65 | 71 75 65 6e 74 69 61 6c |ad of se|quential|
|00000410| 6c 79 20 74 6f 20 61 20 | 73 69 6e 67 6c 65 20 70 |ly to a |single p|
|00000420| 72 6f 63 65 73 73 6f 72 | 3f 0a 3e 20 49 73 20 74 |rocessor|?.> Is t|
|00000430| 68 65 72 65 20 61 6e 79 | 20 62 6f 6f 6b 20 6f 72 |here any| book or|
|00000440| 20 72 65 66 65 72 65 6e | 63 65 20 6d 61 74 65 72 | referen|ce mater|
|00000450| 69 61 6c 20 74 68 61 74 | 20 74 61 6c 6b 73 20 61 |ial that| talks a|
|00000460| 62 6f 75 74 20 74 68 65 | 20 43 0a 3e 20 69 6d 70 |bout the| C.> imp|
|00000470| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 70 |lementat|ion of p|
|00000480| 61 72 61 6c 6c 65 6c 20 | 70 72 6f 63 65 73 73 69 |arallel |processi|
|00000490| 6e 67 20 69 6e 20 6d 75 | 6c 74 69 2d 70 72 6f 63 |ng in mu|lti-proc|
|000004a0| 65 73 73 6f 72 73 20 73 | 79 73 74 65 6d 3f 0a 3e |essors s|ystem?.>|
|000004b0| 20 0a 0a 59 65 73 2e 20 | 42 75 74 20 69 74 27 73 | ..Yes. |But it's|
|000004c0| 20 6e 6f 74 20 74 72 69 | 76 69 61 6c 20 75 6e 6c | not tri|vial unl|
|000004d0| 65 73 73 20 79 6f 75 20 | 68 61 76 65 20 61 20 63 |ess you |have a c|
|000004e0| 6f 6d 70 69 6c 65 72 20 | 74 68 61 74 20 64 6f 65 |ompiler |that doe|
|000004f0| 73 20 69 74 20 66 6f 72 | 20 79 6f 75 2e 0a 49 20 |s it for| you..I |
|00000500| 68 61 76 65 20 75 73 65 | 64 20 53 47 49 20 53 4d |have use|d SGI SM|
|00000510| 50 20 6d 61 63 68 69 6e | 65 73 20 28 4f 4e 59 58 |P machin|es (ONYX|
|00000520| 20 34 78 52 34 34 30 30 | 2f 31 35 30 20 65 74 63 | 4xR4400|/150 etc|
|00000530| 29 20 61 6e 64 20 74 68 | 65 20 63 75 72 72 65 6e |) and th|e curren|
|00000540| 74 6c 79 0a 70 72 65 66 | 65 72 65 64 20 6d 65 74 |tly.pref|ered met|
|00000550| 68 6f 64 20 69 73 20 74 | 6f 20 75 73 65 20 74 68 |hod is t|o use th|
|00000560| 65 20 73 70 72 6f 63 28 | 29 20 6f 72 20 6d 5f 66 |e sproc(|) or m_f|
|00000570| 6f 72 6b 28 29 20 63 61 | 6c 6c 73 2e 20 54 68 65 |ork() ca|lls. The|
|00000580| 73 65 20 62 6f 74 68 0a | 69 6e 76 6f 6c 76 65 20 |se both.|involve |
|00000590| 63 72 65 61 74 69 6e 67 | 20 61 64 64 69 74 69 6f |creating| additio|
|000005a0| 6e 61 6c 20 70 72 6f 63 | 65 73 73 65 73 20 77 68 |nal proc|esses wh|
|000005b0| 69 63 68 20 61 72 65 20 | 74 68 65 6e 20 73 63 68 |ich are |then sch|
|000005c0| 65 64 75 6c 65 64 20 74 | 6f 0a 64 69 66 66 65 72 |eduled t|o.differ|
|000005d0| 65 6e 74 20 70 72 6f 63 | 65 73 73 6f 72 73 20 62 |ent proc|essors b|
|000005e0| 79 20 74 68 65 20 4f 53 | 2e 20 49 20 67 75 65 73 |y the OS|. I gues|
|000005f0| 73 20 74 68 65 72 65 27 | 73 20 73 6f 6d 65 74 68 |s there'|s someth|
|00000600| 69 6e 67 20 73 69 6d 69 | 6c 61 72 20 6f 6e 0a 53 |ing simi|lar on.S|
|00000610| 55 4e 73 2e 20 49 27 6d | 20 73 75 72 65 20 74 68 |UNs. I'm| sure th|
|00000620| 65 79 20 68 61 76 65 20 | 69 6d 70 6c 65 6d 65 6e |ey have |implemen|
|00000630| 74 65 64 20 50 4f 53 49 | 58 20 74 68 72 65 61 64 |ted POSI|X thread|
|00000640| 73 20 6f 6e 20 53 55 4e | 73 20 77 68 69 63 68 20 |s on SUN|s which |
|00000650| 61 72 65 0a 6c 69 67 68 | 74 20 77 65 69 67 68 74 |are.ligh|t weight|
|00000660| 20 70 72 6f 63 65 73 73 | 65 73 20 28 74 68 65 79 | process|es (they|
|00000670| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 74 68 65 69 | don't h|ave thei|
|00000680| 72 20 6f 77 6e 20 50 49 | 44 73 20 75 6e 6c 69 6b |r own PI|Ds unlik|
|00000690| 65 20 73 70 72 6f 63 28 | 29 27 64 0a 61 6e 64 20 |e sproc(|)'d.and |
|000006a0| 6d 5f 66 6f 72 6b 28 29 | 27 64 20 70 72 6f 63 65 |m_fork()|'d proce|
|000006b0| 73 73 65 73 29 20 2d 20 | 73 6f 20 74 68 61 74 20 |sses) - |so that |
|000006c0| 77 6f 75 6c 64 20 70 72 | 6f 62 61 62 6c 79 20 62 |would pr|obably b|
|000006d0| 65 20 74 68 65 20 62 65 | 73 74 20 6f 70 74 69 6f |e the be|st optio|
|000006e0| 6e 2e 0a 53 47 49 20 68 | 61 76 65 20 61 20 70 72 |n..SGI h|ave a pr|
|000006f0| 6f 64 75 63 74 20 63 61 | 6c 6c 65 64 20 50 6f 77 |oduct ca|lled Pow|
|00000700| 65 72 20 43 20 77 68 69 | 63 68 20 61 75 74 6f 6d |er C whi|ch autom|
|00000710| 61 74 69 63 61 6c 6c 79 | 20 70 61 72 61 6c 65 6c |atically| paralel|
|00000720| 6c 69 73 65 73 20 43 20 | 63 6f 64 65 0a 69 6e 20 |lises C |code.in |
|00000730| 73 69 74 75 61 74 69 6f | 6e 73 20 73 75 63 68 20 |situatio|ns such |
|00000740| 61 73 20 74 68 65 20 6f | 6e 65 20 61 62 6f 76 65 |as the o|ne above|
|00000750| 2e 20 49 20 68 61 76 65 | 6e 27 74 20 74 6f 75 63 |. I have|n't touc|
|00000760| 68 65 64 20 6f 6e 20 74 | 68 65 20 69 73 73 75 65 |hed on t|he issue|
|00000770| 20 6f 66 0a 77 68 61 74 | 20 79 6f 75 20 64 6f 20 | of.what| you do |
|00000780| 69 6e 20 27 61 20 6c 6f | 74 20 6f 66 20 6f 70 65 |in 'a lo|t of ope|
|00000790| 72 61 74 69 6f 6e 73 2e | 2e 2e 2e 2e 27 20 2d 20 |rations.|....' - |
|000007a0| 79 6f 75 20 6d 75 73 74 | 20 6f 72 67 61 6e 69 73 |you must| organis|
|000007b0| 65 20 74 68 65 0a 73 65 | 70 61 72 61 74 65 20 74 |e the.se|parate t|
|000007c0| 68 72 65 61 64 27 73 20 | 61 63 63 65 73 73 65 73 |hread's |accesses|
|000007d0| 20 74 6f 20 6d 65 6d 6f | 72 79 20 28 65 76 65 6e | to memo|ry (even|
|000007e0| 20 63 72 65 61 74 65 20 | 69 74 20 74 6f 20 73 74 | create |it to st|
|000007f0| 61 72 74 20 77 69 74 68 | 20 2d 0a 64 65 70 65 6e |art with| -.depen|
|00000800| 64 69 6e 67 20 6f 6e 20 | 77 68 61 74 20 6d 65 63 |ding on |what mec|
|00000810| 68 61 6e 69 73 6d 20 79 | 6f 75 20 75 73 65 20 2d |hanism y|ou use -|
|00000820| 20 73 70 72 6f 63 28 29 | 20 63 61 6e 20 6d 61 6b | sproc()| can mak|
|00000830| 65 20 79 6f 75 72 20 67 | 6c 6f 62 61 6c 20 64 61 |e your g|lobal da|
|00000840| 74 61 0a 73 68 61 72 65 | 64 20 62 65 74 77 65 65 |ta.share|d betwee|
|00000850| 6e 20 70 72 6f 63 65 73 | 73 65 73 29 20 75 73 69 |n proces|ses) usi|
|00000860| 6e 67 20 73 65 6d 61 70 | 68 6f 72 65 73 20 6f 72 |ng semap|hores or|
|00000870| 20 73 75 63 68 20 6c 69 | 6b 65 2e 0a 0a 48 6f 70 | such li|ke...Hop|
|00000880| 65 20 74 68 69 73 20 68 | 65 6c 70 73 2e 0a 0a 4d |e this h|elps...M|
|00000890| 61 78 2e 0a 0a 3e 20 54 | 68 61 6e 6b 73 20 66 6f |ax...> T|hanks fo|
|000008a0| 72 20 68 65 6c 70 73 20 | 61 6e 64 20 70 6f 69 6e |r helps |and poin|
|000008b0| 74 65 72 73 2e 0a 3e 20 | 0a 3e 20 41 6c 65 78 0a |ters..> |.> Alex.|
|000008c0| 3e 20 2d 2d 0a 3e 20 20 | 20 2b 2d 2d 2d 2d 2d 2d |> --.> | +------|
|000008d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000008f0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00000900| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2b 0a 3e 20 20 20 |--------|--+.> |
|00000910| 7c 20 4e 61 6d 65 20 20 | 20 20 20 3a 20 20 20 4c || Name | : L|
|00000920| 69 70 63 68 65 6e 20 41 | 6c 65 78 20 43 68 61 6e |ipchen A|lex Chan|
|00000930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000950| 20 7c 0a 3e 20 20 20 7c | 20 45 2d 6d 61 69 6c 20 | |.> || E-mail |
|00000960| 20 20 3a 20 20 20 63 68 | 61 6e 40 65 6e 67 2e 62 | : ch|an@eng.b|
|00000970| 75 66 66 61 6c 6f 2e 65 | 64 75 20 6f 72 20 63 68 |uffalo.e|du or ch|
|00000980| 61 6e 40 61 63 73 75 2e | 62 75 66 66 61 6c 6f 2e |an@acsu.|buffalo.|
|00000990| 65 64 75 20 20 20 20 20 | 7c 0a 3e 20 20 20 2b 2d |edu ||.> +-|
|000009a0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000009d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2b |--------|-------+|
|000009e0| 0a 0a 2d 2d 20 0a 20 20 | 20 20 5f 5f 5f 20 20 20 |..-- . | ___ |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 20 20 20 6d 61 69 6c 74 | 6f 3a 6d 61 78 2d 6c 74 | mailt|o:max-lt|
|00000a10| 6f 6e 40 74 63 70 2e 63 | 6f 2e 75 6b 20 0a 20 20 |on@tcp.c|o.uk . |
|00000a20| 2f 20 20 2f 20 20 2f 20 | 20 5f 20 20 20 20 20 20 |/ / / | _ |
|00000a30| 20 2f 20 20 20 20 20 2f | 20 20 5f 20 20 5f 5f 20 | / /| _ __ |
|00000a40| 5f 5f 20 20 20 5f 20 20 | 20 5f 5f 20 20 20 5f 0a |__ _ | __ _.|
|00000a50| 20 2f 20 20 2f 20 20 2f | 20 2f 5f 2f 20 7c 2f 20 | / / /| /_/ |/ |
|00000a60| 20 2f 20 20 2f 20 20 2f | 20 2f 5f 2f 20 20 2f 20 | / / /| /_/ / |
|00000a70| 20 2f 5f 20 20 20 2f 5f | 2f 20 2f 20 2f 20 2f 20 | /_ /_|/ / / / |
|00000a80| 2f 5f 2f 20 2f 7c 20 2f | 0a 2f 20 20 2f 20 20 2f |/_/ /| /|./ / /|
|00000a90| 20 2f 20 20 2f 20 2f 7c | 20 20 2f 5f 2f 5f 2f 20 | / / /|| /_/_/ |
|00000aa0| 2f 20 20 2f 20 20 2f 20 | 20 2f 5f 20 20 2f 20 20 |/ / / | /_ / |
|00000ab0| 7c 20 20 2f 20 2f 20 2f | 20 2f 20 20 2f 20 2f 20 || / / /| / / / |
|00000ac0| 7c 2f 0a | ||/. | |
+--------+-------------------------+-------------------------+--------+--------+